home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-17 | 897 b | 49 lines | [TEXT/CWIE] |
- Program HSetVolTest;
-
- Uses
- XPascalIO, Fonts;
-
- { Test program for the XPascalIO unit. }
- { Asks the user for an input and an output }
- { file, and copies one to the other, while echoing }
- { the contents to the text window. }
- { Greg Ewing, 1996 }
-
- { Updated to a CodeWarrior project, 12/17/96, Bill Catambay }
-
- Var
- spec1, spec2: FSSpec;
- f1, f2: text;
- line: Str255;
-
- Procedure InitToolbox;
-
- begin
- InitGraf(@qd.thePort);
- InitFonts;
- InitWindows;
- InitMenus;
- TEInit;
- InitDialogs(NIL);
- InitCursor;
- MaxApplZone;
- MoreMasters;
- end;
-
- begin
- InitToolbox;
- if GetOldFile('TEXT', spec1) then
- if GetNewFile('Save copy as:', concat(spec1.name, ' copy'), spec2) then
- begin
- FSpReset(f1, spec1);
- FSpRewrite(f2, spec2, 'TEXT', 'PJMM');
- while not eof(f1) do
- begin
- readln(f1, line);
- writeln(line);
- writeln(f2, line);
- end;
- close(f1);
- close(f2);
- end;
- end.